<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>事件触发</title>
    <style>
        #tip>button{
            background: #0043d3;
        }
    </style>
</head>
<body>
    <div id="tip">
        <button onclick='a=document.getElementById("tip");
        a.innerText="welcome";'>点我一下获取信息</button>
        <button ondblclick='a=document.getElementById("tip");
        a.innerText="welcome"'>双击我获取信息</button>
        <button onmouseover='a=document.getElementById("tip");
        a.innerText="welcome"'>移入鼠标获取信息</button>
        <button onmouseout='a=document.getElementById("tip");
        a.innerText="welcome"'>移出鼠标获取信息</button>
        <button onmousemove=' const pi=3.14;a=document.getElementById("tip");
        a.innerText=pi'>移动鼠标获取信息</button>
    </div>
</body>
</html>